<?php
/* @var $this BodegasController */
/* @var $model bodegas */
/* @var $form CActiveForm */
?>
<div class="ajuste">
<div class="form">


<!--  Tooltip-->
<?php
$this->widget('application.extensions.tipsy.Tipsy', array(
  'fade' => false,
  'gravity' => 'n',
  'items' => array(
    array('id' => '.tooltipster'),
    array('id' => '#tooltipster'),
    array('id' => array('model' => $model, 'attribute' => 'model_attribute_name')
     ,'fallback' => 'Put custom tooltip here.' ),    
  ),  
));
?>



<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'bodegas-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	

	<?php echo $form->errorSummary($model); ?>

	<div class="rowv" >
		<?php echo $form->labelEx($model,'Bo_idcodigo_PK'); ?>
		<?php echo $form->textField($model,'Bo_idcodigo_PK',array('style'=>'width:20%',"class"=>"form-group  form-control")); ?>
		<?php echo"<img src='../images/help_icon.gif' class='tooltipster' title='Código de la bodega. Definir formato.'>" ?>
		<?php echo $form->error($model,'Bo_idcodigo_PK'); ?>
	</div>
       
	<div class="row">
		<?php echo $form->labelEx($model,'Bo_nombrebodega'); ?>
		<?php echo $form->textField($model,'Bo_nombrebodega',array('style'=>'width:20%','size'=>20,'maxlength'=>20,"class"=>"form-group  form-control")); ?>
		<?php echo"<img src='../images/help_icon.gif' class='tooltipster' title='Nombre distintivo de la bodega.'>" ?>
		<?php echo $form->error($model,'Bo_nombrebodega'); ?>
	</div>
	<div class="row">
<?php echo $form->labelEx($model,'Us_idusuario_FK'); ?>		
		<?php echo $form->error($model,'Us_idusuario_FK'); ?>
		<?php echo $form->hiddenField($model,'Us_idusuario_FK',array('size'=>25,'maxlength'=>25, "class"=>"form-group  form-control"));
		$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
			'name'=>'Us_idusuario_FK',
			 'attribute'=>'Us_idusuario_FK',
			'model'=>$model,
			'sourceUrl'=>$this->createUrl('ListarEstados2'),
			'options'=>array(
				'minLength'=>'1',
				'showAnim'=>'fold',
			'select' => 'js:function(event, ui)
				{ jQuery("#Contrato_estado").val(ui.item["id"]); }',
				'search'=> 'js:function(event, ui)
				{ jQuery("#Contrato_estado").val(0); }'
				),
			)); ?>
			
			<?php echo"<img src='../images/help_icon.gif' class='tooltipster' title='Nombre de usuario el cual le asociaran la bodega que pertenesca.'>" ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'Bo_ubicacion'); ?>
		<?php echo $form->textArea($model,'Bo_ubicacion',array('style'=>'width:19%','size'=>60,'maxlength'=>60,"class"=>"form-group  form-control")); ?>
		<?php echo $form->error($model,'Bo_ubicacion'); ?>
	</div>

	<div class=" row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Agregar' : 'Guardar',array("class"=>"btn btn-primary")); ?>
		<?php echo CHtml::submitButton('Cancelar',array('name'=>'cancelar',"class"=>"btn btn-primary")); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
</div>